﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace Crystal.CustomControls.Controls
{
    public partial class CrystalInfraButton : Infragistics.Win.Misc.UltraButton
    {
        public CrystalInfraButton()
        {
            Layout += CrystalInfraButton_Layout;
        }

        private void CrystalInfraButton_Layout(object sender, LayoutEventArgs e)
        {
            int[] Values = new int[3];
            if (CommonCustomControls.IsValidString(StyleManager.GetStyle("ButtonBackColor"), ref Values))
            {
                this.BackColor = Color.FromArgb(Values[0], Values[1], Values[2]);
            }
            if (CommonCustomControls.IsValidString(StyleManager.GetStyle("ButtonForeColor"), ref Values))
            {
                this.ForeColor = Color.FromArgb(Values[0], Values[1], Values[2]);
            }
        }
    }
}
